Noise analysis of Grover and phase estimation algorithms implemented as quantum singular value transformations for a small number of noisy qubits

The quantum singular value transformation (QSVT) algorithm is a general framework to implement most of the known algorithms and provides a way forward for designing new algorithms. In the present work, the impact of noise on the QSVT algorithm is examined for bit flip, phase flip, bit-phase flip, and depolarizing noise models for a small number of qubits. The small number of noisy qubits approximates the currently available noisy quantum computers. For simulation results, the QSVT implementation of the Grover search and quantum phase estimation (QPE) algorithms is considered. These algorithms are among the basic quantum algorithms and form the building blocks of various applications of quantum algorithms. The results showed that the QSVT implementation of the Grover search and QPE algorithms has a consistently worse dependence upon noise than the original implementation for all four noise models. The probability of success of the Grover algorithm and phase measured by the QPE algorithm were found to exponentially depend upon the error probability in the noisy channels but only linearly dependent on the number of qubits.


Quantum singular value transformation
The basis of the QSVT algorithm is the singular value transformation, which can decompose any arbitrary matrix Â as where the singular values σ k are non-negative and real.Furthermore, Â has the left and right vector spaces that are spanned by {|u k �} and {|v k �} , respectively.This description of Â allows us to write any polynomial of this matrix as a function of its singular values σ k .This property is a necessary condition for block encoding Â as where Using this process we can encode Â within a subspace of Û accessible by the projection operator P = k |u k ��u k | and P′ = k |v k ��v k | , such that Â = P′ Û P2 .We must construct projection-controlled phase operators to utilize this block encoding for the QSVT algorithms, which will substitute the rotation operator in the signal processing framework.These operators take the form P′ φ i and Pφ j , which induces a phase to the ancilla qubit when our system is in the subspace where Â is encoded.Substituting these unitary Û and projection-controlled phase operators in the quantum signal processing algorithm allows for the construction of unitaries 6 which can implement any polynomial Poly (SV ) ( Â) on the domain of σ k ∈ [−1, 1] with the rotation parameters � = (φ 1 , φ 2 , ..., φ d ) and has the properties 11  Armed with these operators, we need only determine the polynomial that approximates the problem along with the rotation parameters � = (φ 1 , φ 2 , ..., φ d ) to construct Û 9,11 .For example, the HHL algorithm can be imple- mented in the QSVT framework to solve a set of linear equations efficiently 12 where the polynomial used is a well-behaved approximation of f (x) = 1/x with determined using algorithms such as Remez-type exchange 8,13 .Within the scope of this paper, we will only focus on the Grover search and phase estimation algorithm with the rotation parameters which allow for the construction of any dth order Chebyshev polynomial required for the Grover search and QPE 6,7 .

Grover search algorithm
The Grover search algorithm searches for a marked state within an unstructured search space.This is achieved by the amplification of the probability amplitude of the marked state over r iteration of the Grover Oracle.The traditional structure of the Grover oracle contains two operators, the phase oracle, Ûg defined as which kicks back a negative phase onto the marked state |m� , and the diffuser, that amplifies this state's prob- ability amplitude.Since we want to amplify the states |m� from an initial state of uniform superposition |ψ 0 � = |+� = Ĥ⊗n |0� , the state evolves such that Û� |ψ 0 � → |m� , where Ĥ⊗n is the Hadamard transform.The Grover algorithm is a specific case of the amplitude amplification algorithm, and if the system does not initially (4) Ûg |j� = (−1) δ jm |j� contain the marked state, the algorithm always fails.The circuit diagram of the non-QSVT Grover is given in Fig. 1.A key factor in this circuit is that the ancilla qubit is initialized in an eigenstate of X which reduces gate complexity for the phase oracle.
The QSVT equivalent of the Grover search algorithm using the phase oracle defined in Eq. ( 4) can be written as the polynomial that satisfies the condition where c m is the probability amplitude of |m� in |ψ 0 � state.Hence, the polynomial has odd parity and the upper- bound is Poly(1/ √ 2 n ) ≤ 1 .Therefore, we can use the Û defined for odd parity.The QSVT implementation of the Grover search algorithm is shown in Fig. 2 with the phase oracle and diffuser highlighted.The first part of the QSVT Grover iterate, with the phase gate sandwiched between the C P NOT gates is Pφ j which is equivalent to the oracle Ûg as it attaches a negative phase to the marked state.At the same time, the rest acts as the diffuser and reflects the state around the uniform superposition state |ψ 0 � .The ampli- tude amplification process for the QSVT Grover search is also identical to the non-QSVT, except gate expense for the phase induction is much higher.This circuit uses O (2 n/2 (1/δ)) queries for a single marked state to the projection-controlled phase operators for both the left and right subspace and the preparation unitary V = Ĥ⊗n operator.The δ is the error tolerance and leads to the probability of success ≥ 1 − δ 7 .For the Grover search the projection operators are defined as P = Î − |m��m| and P′ = Î − |0��0|.Hence, with the combination of these gates in the order shown in Fig. 2, we see the reproduction of the non-QSVT Grover search algorithm.This implies that the QSVT Grover oracle can be resolved using geometric arguments and requires r queries for the maximum amplitude of the marked state because of its sinusoidal amplitude amplification relation with iterations.Let us note that the non-QSVT Grover search influenced the working principle of signal processing used in QSVT through amplitude amplification.That is why, we can draw parallels between the algorithms and identify the non-QSVT oracle and diffuser within the unique circuitry of the QSVT framework.

Quantum phase estimation
The quantum phase estimation algorithm was developed as an application of the Quantum Fourier Transform (QFT) and allows us to find the eigenvalue of the operator Ûp , which can be represented as The algorithm outputs the phase θ and assumes that we have a preparation oracle that constructs the state |u� and can implement Ûj p with high accuracy.The non-QSVT phase estimation algorithm shown in Fig. 3 uses n qubit to output θ , where the jth bit of θ is encoded into the (n − j)th qubit using the inverse QFT.
The QSVT implementation of the QPE algorithm is based on Kitaev's iterative algorithm and approximates the phase introduced by a unitary Ûp , using a semi-classical feedback process 14,15 .The Kitaev method employs the less significant bits of θ to estimate the next significant bit; hence, it requires the phase of each bit to be encoded into the system state before the next bit can be approximated.This encoding cannot be achieved using the inverse QFT but can be represented as a polynomial, which enables the construction of the QSVT QPE algorithm 7,16 .Since the QSVT implementation of the QPE is iterative, the lth loop approximates the θ l by encoding the less significant bits.For this we can expand the induced phase as θ = 0.θ 1 θ 2 ...θ l ...θ n and phase encoded after the lth iteration as θ ′ = 0.θ l+1 , θ l+2 ...θ n .The sign function is the polynomial required for estimating and encoding the lth bit.However, since it is discontinuous, we instead use a symmetrized polynomial approximate, with even parity and an upper bound of magnitude 1 7 .
The QSVT circuit corresponding to this polynomial is shown in Fig. 4, where d determines the accuracy of each iteration.This block traverses from l = n − 1, n − 2..0 where Ŵl (θ ′ ) takes the less significant bits as input and can be represented as The circuit for the operator Ŵl (θ ′ ) is shown in Fig. 5, and makes O (n − l) queries to the controlled rotation gates each of which is controlled by the projection operators.Furthermore, the lth iteration makes O (nlog(n/δ)) queries to the operator Ŵj , and the projection controlled operators C P′ NOT where P = P′ = |0��0| ⊗ Î .On the last iteration the circuit outputs θ ′ , with the error |θ − θ ′ | < 1/2 n and probability of success ≥ 1 − δ , where δ is the error tolerance.Although the inverse QFT is not applied in the QSVT QPE circuit, its block-encoded equivalent emerges after working out the circuit for d = 1 and separating all the unitaries and the rotation gates.

Results and discussion
In this work, we used the noise model representing the simplest noise processes in a single qubit.The QSVT and non-QSVT algorithms are compared for the bit flip, phase flip, bit-phase flip, and the depolarizing noise channel.The evolution of the state under the noisy channel can be characterized as, The lth section of the non-QSVT quantum circuit for phase estimation algorithm.where the Kraus operators Êk depend on the channel such that Ê † k Êk = Î .Operators corresponding to the noise models are provided in Table 1.
For all the numerical results in the paper, the algorithms were decomposed into the form of the single qubit basic gates set { Î, X, X, Rz, CNOT} before the noise models were introduced into the gates.For the single qubit gates, the noise channel was applied right after each gate operation.For the two-qubit CNOT gate, the noise channels were applied to both the control and target qubits independent of each other 17 .The results in this section were produced after the algorithm was simulated for 10, 000 shots and measured in the computational basis as a function of the probability of error p.

Grover search algorithm
The Grover search algorithms implemented for this report have the marked state |m� = |1� ⊗n and corre- sponding projection-controlled operator P = Î − |11..1��11...1| .The algorithm's efficiency is analyzed using the probability of marked state after r iterations of the Grover oracle and is referred to as the probability of success.This probability of success for the non-QSVT and QSVT Grover search is plotted in Fig. 6 against the probability of error p for the search space of dimensions n = {3, 4}.
The plots show that the probability of success inherent to the QSVT Grover is higher than that of the non-QSVT Grover for any given value of p. Across all results, for high value p, the probability of success approaches a 1/2 n , which is the coefficient of the marked state in the maximally mixed state I/2 n .Therefore, the noise drives the system's output to a maximally mixed state.However, this approach to maximally mixed state comes for smaller value of p for QSVT algorithm than the non-QSVT implementation.The results also show that with an increase in the number of qubits, the probability of success reduces.Furthermore, all the the noise channels have approximately the same dependence except the bit-phase flip channel that has consistently the worst impact on the probability of success.
For the same probability of error p, we can also see that the QSVT Grover search algorithm performs worse than the non-QSVT algorithm, and these results can be generalized to higher dimensions.As discussed above, the QSVT implementation contains the C P NOT φ and V † C P′ NOT φ V which are equivalent to the phase oracle and diffuser of the non-QSVT algorithm respectively.The results in Fig. 6 show that the the probability of success depends exponentially upon the probability of error of the noise channel.This exponential dependence is stronger for the QSVT than the original algorithm.
Since the Grover algorithm merely rotates the marked state in a space spanned by the desired output state and the state orthogonal to it, the output is a periodic function of the number of iterations.This error accumulation against the number of iterations is plotted in Fig. 7 for n = 5 and probability of error p = 0.0003 .The optimum number of iterations of the oracle for the search space n = 5 and a single marked state is r = 4 .Hence, for a noiseless oracle, we would have amplitude maximized at r = 4 , which matches the result for non-QSVT Grover, but for QSVT Grover, the maximum amplitude of marked state is achieved at r = 3 showing that the noise impact is so high that the information gained by going to r = 4 using the QSVT algorithm is outpaced by the error in this iteration.The probability of success for the non-QSVT is also significantly higher than the QSVT algorithm.These results also match the result from Fig. 6; the QSVT performs worse than the non-QSVT Grover algorithm, and both have the worst performance for the bit-phase flip noise channel.
The higher noise impact on the QSVT algorithm is due to a higher number of gates than the non-QSVT algorithm for the same number of working qubits.This dependence can be seen in Table 2 where we can see that the gate count for the QSVT is higher than the non-QSVT and the number of extra gates increases with the dimension of the search space n.This is also true for the depth of the circuit which quantifies the highest number of sequential gate operations on a qubit in the system.Another notable features is a particularly high count of CNOT gates for the QSVT algorithm.This is because QSVT algorithm performs many operations as controlled operations, which gives rise very high number of CNOT gates.

Phase estimation algorithm
For the noise analysis of the phase estimation algorithm, we used the expectation value of the measured phase θ ′ when the actual phase θ was introduced using the unitary Û .For all results, we have used n = 5 qubits and have used d = 2 for the QSVT algorithm.The average value of observed θ ′ was used as our metric for comparing the two implementations.The simulation results for the average value of θ ′ is shown in Fig. 8 against the probability of error p for θ = θ l = 0.00001 (in binary) and θ = θ h = 0.11111 (in binary) as two extremal values.For θ h simulation of ( 7) Table 1.The Kraus operators corresponding to the different noisy channels used for the noise analysis in Eq. ( 7).The σi signifies that all Pauli gates are used for the depolarizing channel.www.nature.com/scientificreports/non-QSVT QPE, the channels have similar noise impact for all the channels, but for θ l , the algorithm is most robust against the bit flip channels and least for the phase flip channel.For θ = θ h , the QSVT QPE performs significantly better against the phase flip channel but is more susceptible to the bit-phase flip channel.Across all results, we see that for a low value of p, the average value of θ ′ is close to the actual value but eventually approaches ∼ 0.5 when p increases because the output state approaches the maximally mixed state.However, the approach to the maximally mixed state is more rapid for the QSVT than the non-QSVT implementation of the QPE.Just like the Grover, the expected value of the output phase seem to exponentially depend upon the error probability of the noise channels both for the QSVT and the original formulation, and this exponential dependence is stronger for the QSVT than the original formulation.Furthermore, a comparison with the Grover algorithm shows that the QPE is much more robust to noise than the Grover algorithm.

Channel Kraus Operators
To understand the scaling of noise with the number of qubits, the expected value of θ ′ for different numbers of qubits n is shown in Fig. 9.The actual value of the phase was set as 1 − 2 −n since this was the maximum possible value of the phase for given number of qubits.We needed a consistent value of actual phase for comparing the output across different number of qubits.The expected value of θ ′ for n = 5 match the results shown in Fig. 8.
The results in Fig. 9 shows that the output state approaches maximally mixed state as number of qubits increase www.nature.com/scientificreports/even for a fixed error probability p = 0.005 .Though the rate of approach slightly depends upon the noise chan- nel except for the phase-fllip noise for the QSVT QPE.The scan of the results show that the dependence of the expected value of θ is almost linearly dependent upon the number of qubits, as opposed to exponential depend- ence upon the error probability of the noise channels.
The number of single and double-qubit gates is given in Table 3 along with the depth of the circuit.The table shows that an increase in n not only increases the number of gates, but also the depth of the circuit.The increase in gates and depth increase the error in the output of the algorithm.Furthermore, the table clearly shows a significantly higher number of gates and higher depth for the QSVT algorithm than the original implementation.This explains the worse perofrmance of the QSVT algorithm than the original formulation.

Conclusions
We simulated the implementation of Grover search and quantum phase estimation (QPE) algorithms using original and quantum singular value transformation (QSVT) algorithms for a small number of working qubits relevant to noisy quantum computers.We decomposed the QSVT algorithm and showed how the non-QSVT equivalent of those circuits emerged.It was shown that the probability of success for Grover and the expected phase measured from the QPE showed stronger dependence upon the error probability for QSVT implementation than the original algorithm.This stronger dependence of the QSVT algorithm is due to higher number of one-and two-qubit gates required than the original formulation.Furthermore, the increase in the depth of the circuit with the increase in the number of qubits makes the output of the QPE algorithm approach maximally mixed state when the number of qubits are increased even at fixed error probability of the noise channels.Similar results were seen for all four noise channels considered in this work.The probability of success of the Grover algorithm and phase measured by the QPE algorithm were found to exponentially depend upon the error probability in the noisy channels but only linearly dependent on the number of qubits.Let us note that more investigations are needed to understand the dependence upon the error probability and the number of qubits.
A comparison of results of QPE and Grover algorithm shows that the Grover algorithm's dependence upon the noise is stronger than the QPE both for the original formulation and for the QSVT implementation.This is because of the higher number of gates and higher depth for the Grover algorithm than the QPE both for the original and for the QSVT implementation.The consistently worse performance for the QSVT implementation across four different types of noise models shows that the QSVT algorithm's advantage is limited on today's noisy quantum computers 10 .

( 5 ) 6 )Figure 1 .Figure 2 .
Figure1.The non-QSVT quantum circuit for Grover search algorithm, composed of the phase oracle and diffuser, which amplify the state using the phase kicked back onto the ancilla qubit.

Figure 4 . 2 lFigure 5 .
Figure 4.The lth section of the QSVT quantum circuit for phase estimation algorithm, where φ is a phase rotation gate which takes the rotation parameters as argument and the C P NOT and C P′ NOT gates target the ancilla qubit.

Figure 6 .Figure 7 .
Figure 6.The probability of success for various noise models for non-QSVT and QSVT Grover search algorithms when the number of working qubits was 3 or 4. The probability of success was computed by running the algorithm for 10, 000 shots at each value of p.

Figure 9 .
Figure 9. Average value of θ ′ against the number of working qubits n with probability of error p = 0.005 for non-QSVT and QSVT QPE algorithms.The actual phase in the unitary operator U p was set at 1 − 2 −n .

Table 2 .
The number of gates and depth of the circuit for non-QSVT and QSVT Grover algorithms.
n Non-

QSVT QSVT Single qubit gates CNOT gates Depth Single qubit gates CNOT gates Depth
Average value of θ ′ against the probability of error p, for non-QSVT and QSVT QPE algorithm for two values of θ .The dotted line shows the average value of θ ' for a maximally mixed state.

Table 3 .
Number of gates for non-QSVT and QSVT QPE algorithms.
n Non-